﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class YoozooModulesInnerCityCityUtilsWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(Yoozoo.Modules.InnerCity.CityUtils);
			Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
			
			
			
			
			
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 4, 3, 3);
			Utils.RegisterFunc(L, Utils.CLS_IDX, "AddBuildingPrefab", _m_AddBuildingPrefab_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "RemoveBuildingPrefab", _m_RemoveBuildingPrefab_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "GetBuilding", _m_GetBuilding_xlua_st_);
            
			
            
			Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "AddBuildingEvent", _g_get_AddBuildingEvent);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "RemoveBuildingEvent", _g_get_RemoveBuildingEvent);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "GetBuildingFunc", _g_get_GetBuildingFunc);
            
			Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "AddBuildingEvent", _s_set_AddBuildingEvent);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "RemoveBuildingEvent", _s_set_RemoveBuildingEvent);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "GetBuildingFunc", _s_set_GetBuildingFunc);
            
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            return LuaAPI.luaL_error(L, "Yoozoo.Modules.InnerCity.CityUtils does not have a constructor!");
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            return LuaAPI.luaL_error(L, "Yoozoo.Modules.InnerCity.CityUtils does not have a constructor!");
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_AddBuildingPrefab_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    string _prefabPath = LuaAPI.lua_tostring(L, 1);
                    int _buildingId = LuaAPI.xlua_tointeger(L, 2);
                    int _bIndex = LuaAPI.xlua_tointeger(L, 3);
                    UnityEngine.Vector3 _pos;translator.Get(L, 4, out _pos);
                    
                    Yoozoo.Modules.InnerCity.CityUtils.AddBuildingPrefab( _prefabPath, _buildingId, _bIndex, _pos );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RemoveBuildingPrefab_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    int _buildingId = LuaAPI.xlua_tointeger(L, 1);
                    int _bIndex = LuaAPI.xlua_tointeger(L, 2);
                    
                    Yoozoo.Modules.InnerCity.CityUtils.RemoveBuildingPrefab( _buildingId, _bIndex );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetBuilding_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    int _buildingId = LuaAPI.xlua_tointeger(L, 1);
                    int _bIndex = LuaAPI.xlua_tointeger(L, 2);
                    
                        var gen_ret = Yoozoo.Modules.InnerCity.CityUtils.GetBuilding( _buildingId, _bIndex );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_AddBuildingEvent(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    translator.Push(L, Yoozoo.Modules.InnerCity.CityUtils.AddBuildingEvent);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_RemoveBuildingEvent(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    translator.Push(L, Yoozoo.Modules.InnerCity.CityUtils.RemoveBuildingEvent);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_GetBuildingFunc(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    translator.Push(L, Yoozoo.Modules.InnerCity.CityUtils.GetBuildingFunc);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_AddBuildingEvent(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    Yoozoo.Modules.InnerCity.CityUtils.AddBuildingEvent = translator.GetDelegate<System.Action<string, int, int, UnityEngine.Vector3>>(L, 1);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_RemoveBuildingEvent(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    Yoozoo.Modules.InnerCity.CityUtils.RemoveBuildingEvent = translator.GetDelegate<System.Action<int, int>>(L, 1);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_GetBuildingFunc(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    Yoozoo.Modules.InnerCity.CityUtils.GetBuildingFunc = translator.GetDelegate<System.Func<int, int, UnityEngine.Transform>>(L, 1);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
		
		
    }
}
